/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ie.tcd.cs.railtickets.server.dao.impl;

import ie.tcd.cs.railtickets.server.dao.StationDAO;
import java.util.List;
import static ie.tcd.cs.railtickets.server.dao.impl.HibernateSessionFactory.getSession;

/**
 *
 * @author Wenbo Sun
 */
public class StationDAOImpl extends AbstractBaseDAOImpl implements StationDAO {

    public List<String> findAllNames() {
        String query = "select station.name from Station station";
        List<String> result = getSession().createQuery(query).list();
        return result;
    }

}
